home *** CD-ROM | disk | FTP | other *** search
/ 1000 Apple LAN Literacy / 1000 Apple LAN Literacy.iso / Apple LAN Literacy / Literacy Segments Part 3 / Literacy Segments Part 3 / background_53641.txt < prev    next >
Text File  |  1989-08-22  |  13KB  |  560 lines

  1. -- background: 53641 from stack: in
  2. -- bmap block id: 53958
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 2.3.1 Practice3
  6. ----- HyperTalk script -----
  7. on openCard
  8.   global answerTracker
  9.   send mouseUp to bg btn "done"
  10.   put line (line 2 of fld "key") of answerTracker into theLocs
  11.   if theLocs is not empty then
  12.     repeat with i = 1 to number of lines in fld "origins"
  13.       get item (i*2 - 1) to (i*2) of theLocs
  14.       set the loc of fld ("label" & i) to it
  15.     end repeat
  16.   else
  17.     repeat with j = 1 to number of lines in fld "origins"
  18.       set the loc of fld ("label" & j) to (line j of fld "origins")
  19.     end repeat
  20.   end if
  21.   pass openCard
  22. end openCard
  23.  
  24. on closeCard
  25.   global answerTracker
  26.   get line 2 of fld "key"  -- says which line of global to worry about
  27.   put empty into line it of answerTracker
  28.   repeat with i = 1 to number of lines in fld "origins"
  29.     put the loc of fld ("label" & i) & "," after line it of answerTracker
  30.   end repeat
  31.   delete last char of line it of answerTracker
  32.   pass closeCard
  33. end closeCard
  34.  
  35. on moveField
  36.   get fld "decisions"
  37.   repeat until the mouse is up
  38.     if item 2 of the mouseLoc > line 1 of it
  39.     then set the loc of the target to the mouseLoc
  40.   end repeat
  41.   put the loc of the target into temp
  42.   if item 1 of the loc of the target > (line 2 of it) then
  43.     if item 2 of the loc of the target < (line 3 of it) then
  44.       validate (line 1 of fld "destinations")
  45.     else validate (line 2 of fld "destinations")
  46.   end if
  47.   if the loc of the target = temp
  48.   then set the loc of the target to line (last char of the short name of the target) of fld "origins"
  49. end moveField
  50.  
  51. on validate where
  52.   repeat with i = 1 to number of lines in fld "origins"
  53.     if the short name of the target = ("label" & i) then next repeat
  54.     if the loc of fld ("label" & i) = where then exit validate
  55.   end repeat
  56.   set the loc of the target to where
  57. end validate
  58.  
  59. on hideFeedback
  60.   lock screen
  61.   hide fld "Feedback1"
  62.   hide fld "Feedback2"
  63.   hide fld "Feedback3"
  64.   hide fld "Feedback4"
  65.   hide fld "CorrectAnswer"
  66.   hide fld "MasterFeedback"
  67.   hide bg btn "Done"
  68.   unlock screen
  69. end hideFeedback
  70.  
  71. on showFeedback
  72.   lock screen
  73.   show fld "Feedback1"
  74.   show fld "Feedback2"
  75.   show fld "Feedback3"
  76.   show fld "Feedback4"
  77.   show fld "CorrectAnswer"
  78.   show fld "MasterFeedback"
  79.   show bg btn "Done"
  80.   unlock screen
  81. end showFeedback
  82.  
  83.  
  84. -- part 3 (field)
  85. -- low flags: 01
  86. -- high flags: 0000
  87. -- rect: left=18 top=1 right=38 bottom=442
  88. -- title width / last selected line: 0
  89. -- icon id / first selected line: 0 / 0
  90. -- text alignment: 0
  91. -- font id: 156
  92. -- text size: 24
  93. -- style flags: 10240
  94. -- line height: 32
  95. -- part name: Title
  96.  
  97.  
  98. -- part 15 (button)
  99. -- low flags: 00
  100. -- high flags: 0000
  101. -- rect: left=443 top=5 right=72 bottom=512
  102. -- title width / last selected line: 0
  103. -- icon id / first selected line: 0 / 0
  104. -- text alignment: 1
  105. -- font id: 0
  106. -- text size: 12
  107. -- style flags: 0
  108. -- line height: 16
  109. -- part name: Instant Reference
  110. ----- HyperTalk script -----
  111. on mouseUp
  112.   instantReference "2.3.1"
  113. end mouseUp
  114.  
  115.  
  116. -- part 16 (button)
  117. -- low flags: 00
  118. -- high flags: 2000
  119. -- rect: left=480 top=143 right=172 bottom=511
  120. -- title width / last selected line: 0
  121. -- icon id / first selected line: 1310 / 1310
  122. -- text alignment: 1
  123. -- font id: 0
  124. -- text size: 12
  125. -- style flags: 0
  126. -- line height: 16
  127. -- part name: Student Services
  128. ----- HyperTalk script -----
  129. on mousedown
  130.   SSpopUp
  131. end mousedown
  132.  
  133. on mouseup
  134.   if the mouseloc is not within the rect of me then exit to hyperCard
  135.   doSS
  136. end mouseup
  137.  
  138.  
  139.  
  140. -- part 17 (button)
  141. -- low flags: 00
  142. -- high flags: 2000
  143. -- rect: left=482 top=176 right=205 bottom=511
  144. -- title width / last selected line: 0
  145. -- icon id / first selected line: 162 / 162
  146. -- text alignment: 1
  147. -- font id: 0
  148. -- text size: 12
  149. -- style flags: 0
  150. -- line height: 16
  151. -- part name: Help
  152. ----- HyperTalk script -----
  153. on mouseUp
  154.   Help
  155. end mouseUp
  156.  
  157.  
  158.  
  159. -- part 18 (button)
  160. -- low flags: 00
  161. -- high flags: 2000
  162. -- rect: left=482 top=294 right=320 bottom=509
  163. -- title width / last selected line: 0
  164. -- icon id / first selected line: 1236 / 1236
  165. -- text alignment: 1
  166. -- font id: 0
  167. -- text size: 12
  168. -- style flags: 0
  169. -- line height: 16
  170. -- part name: Last Menu
  171. ----- HyperTalk script -----
  172. on mouseUp
  173.   go cd "Naming Facilities P/1"
  174. end mouseUp
  175.  
  176.  
  177. -- part 19 (button)
  178. -- low flags: 00
  179. -- high flags: 2000
  180. -- rect: left=478 top=319 right=341 bottom=498
  181. -- title width / last selected line: 0
  182. -- icon id / first selected line: 1238 / 1238
  183. -- text alignment: 1
  184. -- font id: 0
  185. -- text size: 12
  186. -- style flags: 0
  187. -- line height: 16
  188. -- part name: Prev
  189. ----- HyperTalk script -----
  190. on mouseUp
  191.   lock screen
  192.   go prev
  193.   unlock screen with scroll right
  194. end mouseUp
  195.  
  196.  
  197. -- part 20 (button)
  198. -- low flags: 00
  199. -- high flags: 2000
  200. -- rect: left=493 top=319 right=341 bottom=512
  201. -- title width / last selected line: 0
  202. -- icon id / first selected line: 1237 / 1237
  203. -- text alignment: 1
  204. -- font id: 0
  205. -- text size: 12
  206. -- style flags: 0
  207. -- line height: 16
  208. -- part name: Next
  209. ----- HyperTalk script -----
  210. on mouseUp
  211.   lock screen
  212.   go next
  213.   unlock screen with scroll left
  214. end mouseUp
  215.  
  216.  
  217. -- part 21 (field)
  218. -- low flags: 01
  219. -- high flags: 0000
  220. -- rect: left=16 top=38 right=65 bottom=440
  221. -- title width / last selected line: 0
  222. -- icon id / first selected line: 0 / 0
  223. -- text alignment: 0
  224. -- font id: 156
  225. -- text size: 20
  226. -- style flags: 0
  227. -- line height: 26
  228. -- part name: Subtitle
  229.  
  230.  
  231. -- part 22 (field)
  232. -- low flags: 01
  233. -- high flags: 0000
  234. -- rect: left=16 top=68 right=88 bottom=469
  235. -- title width / last selected line: 0
  236. -- icon id / first selected line: 0 / 0
  237. -- text alignment: 0
  238. -- font id: 3
  239. -- text size: 10
  240. -- style flags: 256
  241. -- line height: 15
  242. -- part name: Instruction
  243.  
  244.  
  245. -- part 27 (field)
  246. -- low flags: 01
  247. -- high flags: 0000
  248. -- rect: left=243 top=95 right=134 bottom=471
  249. -- title width / last selected line: 0
  250. -- icon id / first selected line: 0 / 0
  251. -- text alignment: 0
  252. -- font id: 156
  253. -- text size: 16
  254. -- style flags: 0
  255. -- line height: 17
  256. -- part name: Item1
  257.  
  258.  
  259. -- part 28 (field)
  260. -- low flags: 01
  261. -- high flags: 0000
  262. -- rect: left=243 top=164 right=204 bottom=471
  263. -- title width / last selected line: 0
  264. -- icon id / first selected line: 0 / 0
  265. -- text alignment: 0
  266. -- font id: 156
  267. -- text size: 16
  268. -- style flags: 0
  269. -- line height: 17
  270. -- part name: Item2
  271.  
  272.  
  273. -- part 23 (field)
  274. -- low flags: 01
  275. -- high flags: 2004
  276. -- rect: left=19 top=98 right=142 bottom=127
  277. -- title width / last selected line: 0
  278. -- icon id / first selected line: 0 / 0
  279. -- text alignment: 0
  280. -- font id: 156
  281. -- text size: 16
  282. -- style flags: 0
  283. -- line height: 17
  284. -- part name: Label1
  285. ----- HyperTalk script -----
  286. on mouseDown
  287.   moveField
  288. end mouseDown
  289.  
  290.  
  291. -- part 24 (field)
  292. -- low flags: 01
  293. -- high flags: 2004
  294. -- rect: left=19 top=167 right=211 bottom=127
  295. -- title width / last selected line: 0
  296. -- icon id / first selected line: 0 / 0
  297. -- text alignment: 0
  298. -- font id: 156
  299. -- text size: 16
  300. -- style flags: 0
  301. -- line height: 17
  302. -- part name: Label2
  303. ----- HyperTalk script -----
  304. on mouseDown
  305.   moveField
  306. end mouseDown
  307.  
  308.  
  309. -- part 6 (field)
  310. -- low flags: 81
  311. -- high flags: 0001
  312. -- rect: left=423 top=0 right=13 bottom=466
  313. -- title width / last selected line: 0
  314. -- icon id / first selected line: 0 / 0
  315. -- text alignment: 65535
  316. -- font id: 4
  317. -- text size: 9
  318. -- style flags: 0
  319. -- line height: 12
  320. -- part name: CardTitle
  321.  
  322.  
  323. -- part 33 (field)
  324. -- low flags: 81
  325. -- high flags: 2007
  326. -- rect: left=8 top=36 right=94 bottom=231
  327. -- title width / last selected line: 0
  328. -- icon id / first selected line: 0 / 0
  329. -- text alignment: 0
  330. -- font id: 156
  331. -- text size: 16
  332. -- style flags: 0
  333. -- line height: 17
  334. -- part name: Feedback1
  335.  
  336.  
  337. -- part 34 (field)
  338. -- low flags: 81
  339. -- high flags: 2007
  340. -- rect: left=8 top=97 right=155 bottom=231
  341. -- title width / last selected line: 0
  342. -- icon id / first selected line: 0 / 0
  343. -- text alignment: 0
  344. -- font id: 156
  345. -- text size: 16
  346. -- style flags: 0
  347. -- line height: 17
  348. -- part name: Feedback2
  349.  
  350.  
  351. -- part 35 (field)
  352. -- low flags: 81
  353. -- high flags: 2007
  354. -- rect: left=8 top=159 right=216 bottom=231
  355. -- title width / last selected line: 0
  356. -- icon id / first selected line: 0 / 0
  357. -- text alignment: 0
  358. -- font id: 156
  359. -- text size: 16
  360. -- style flags: 0
  361. -- line height: 17
  362. -- part name: Feedback3
  363.  
  364.  
  365. -- part 36 (field)
  366. -- low flags: 81
  367. -- high flags: 2007
  368. -- rect: left=8 top=219 right=277 bottom=231
  369. -- title width / last selected line: 0
  370. -- icon id / first selected line: 0 / 0
  371. -- text alignment: 0
  372. -- font id: 156
  373. -- text size: 16
  374. -- style flags: 0
  375. -- line height: 17
  376. -- part name: Feedback4
  377.  
  378.  
  379. -- part 37 (field)
  380. -- low flags: 81
  381. -- high flags: 2007
  382. -- rect: left=8 top=280 right=338 bottom=231
  383. -- title width / last selected line: 0
  384. -- icon id / first selected line: 0 / 0
  385. -- text alignment: 0
  386. -- font id: 156
  387. -- text size: 16
  388. -- style flags: 0
  389. -- line height: 17
  390. -- part name: CorrectAnswer
  391.  
  392.  
  393. -- part 39 (field)
  394. -- low flags: 81
  395. -- high flags: 2004
  396. -- rect: left=147 top=132 right=304 bottom=356
  397. -- title width / last selected line: 0
  398. -- icon id / first selected line: 0 / 0
  399. -- text alignment: 0
  400. -- font id: 156
  401. -- text size: 16
  402. -- style flags: 0
  403. -- line height: 17
  404. -- part name: MasterFeedback
  405.  
  406.  
  407. -- part 41 (button)
  408. -- low flags: 80
  409. -- high flags: A002
  410. -- rect: left=215 top=279 right=296 bottom=284
  411. -- title width / last selected line: 0
  412. -- icon id / first selected line: 0 / 0
  413. -- text alignment: 1
  414. -- font id: 0
  415. -- text size: 12
  416. -- style flags: 0
  417. -- line height: 16
  418. -- part name: Done
  419. ----- HyperTalk script -----
  420. on mouseUp
  421.   lock screen
  422.   hide fld "MasterFeedback"
  423.   hide bg btn "Done"
  424.   unlock screen
  425. end mouseUp
  426.  
  427.  
  428.  
  429. -- part 42 (button)
  430. -- low flags: 00
  431. -- high flags: A004
  432. -- rect: left=268 top=321 right=340 bottom=413
  433. -- title width / last selected line: 0
  434. -- icon id / first selected line: 0 / 0
  435. -- text alignment: 1
  436. -- font id: 0
  437. -- text size: 12
  438. -- style flags: 0
  439. -- line height: 16
  440. -- part name: Answer
  441. ----- HyperTalk script -----
  442. on mouseUp
  443.   send mouseUp to bg btn "done"
  444.   repeat with i = 1 to number of lines in fld "origins"
  445.     set the loc of fld ("label" & i) to (line i of fld "origins")
  446.   end repeat
  447.   put line 1 of fld "key" into theLocs
  448.   repeat with i = 1 to number of lines in fld "origins"
  449.     get item (i*2 - 1) to (i*2) of theLocs
  450.     set the loc of fld ("label" & i) to it
  451.   end repeat
  452. end mouseUp
  453.  
  454.  
  455. -- part 51 (button)
  456. -- low flags: 00
  457. -- high flags: 2000
  458. -- rect: left=482 top=208 right=234 bottom=509
  459. -- title width / last selected line: 0
  460. -- icon id / first selected line: 1234 / 1234
  461. -- text alignment: 1
  462. -- font id: 0
  463. -- text size: 12
  464. -- style flags: 0
  465. -- line height: 16
  466. -- part name: Lesson
  467. ----- HyperTalk script -----
  468. on mouseUp
  469.   lesson "2.3.1"
  470. end mouseUp
  471.  
  472.  
  473. -- part 52 (button)
  474. -- low flags: 00
  475. -- high flags: A004
  476. -- rect: left=68 top=321 right=340 bottom=213
  477. -- title width / last selected line: 0
  478. -- icon id / first selected line: 0 / 0
  479. -- text alignment: 1
  480. -- font id: 0
  481. -- text size: 12
  482. -- style flags: 0
  483. -- line height: 16
  484. -- part name: Check Answer
  485. ----- HyperTalk script -----
  486. on mouseUp
  487.   lock screen
  488.   set cursor to watch
  489.   put empty into theList
  490.   get line 1 of fld "key"
  491.   repeat with i = 1 to (number of items in it)/2
  492.     put item (i*2 - 1) of it & "," & item (i*2) of it into theLoc
  493.     if the loc of fld ("label" & i) = theLoc then put "t," after theList
  494.     else put "f," after theList
  495.   end repeat
  496.   delete last char of theList
  497.   if theList = "t,t"
  498.   then put fld "feedback1" into fld "MasterFeedback"
  499. else put fld "feedback2"  into fld "MasterFeedback"
  500. show fld "MasterFeedback"
  501. show bg btn "Done"
  502. unlock screen
  503. end mouseUp
  504.  
  505.  
  506. -- part 53 (field)
  507. -- low flags: 81
  508. -- high flags: 0002
  509. -- rect: left=0 top=0 right=50 bottom=56
  510. -- title width / last selected line: 0
  511. -- icon id / first selected line: 0 / 0
  512. -- text alignment: 0
  513. -- font id: 3
  514. -- text size: 12
  515. -- style flags: 0
  516. -- line height: 16
  517. -- part name: origins
  518.  
  519.  
  520. -- part 54 (field)
  521. -- low flags: 81
  522. -- high flags: 0002
  523. -- rect: left=58 top=0 right=50 bottom=117
  524. -- title width / last selected line: 0
  525. -- icon id / first selected line: 0 / 0
  526. -- text alignment: 0
  527. -- font id: 3
  528. -- text size: 12
  529. -- style flags: 0
  530. -- line height: 16
  531. -- part name: destinations
  532.  
  533.  
  534. -- part 55 (field)
  535. -- low flags: 81
  536. -- high flags: 0002
  537. -- rect: left=119 top=0 right=50 bottom=178
  538. -- title width / last selected line: 0
  539. -- icon id / first selected line: 0 / 0
  540. -- text alignment: 0
  541. -- font id: 3
  542. -- text size: 12
  543. -- style flags: 0
  544. -- line height: 16
  545. -- part name: decisions
  546.  
  547.  
  548. -- part 56 (field)
  549. -- low flags: 81
  550. -- high flags: 0002
  551. -- rect: left=180 top=0 right=34 bottom=329
  552. -- title width / last selected line: 0
  553. -- icon id / first selected line: 0 / 0
  554. -- text alignment: 0
  555. -- font id: 3
  556. -- text size: 12
  557. -- style flags: 0
  558. -- line height: 16
  559. -- part name: key
  560.